package com.fuxi.cloud.desreport.model;

import java.util.List;

/**
 * JmPage
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
public class JmPage<T> {
    private int pageNo;
    private int pageSize;
    private int total;
    private int pages;
    private List<?> records;

    public JmPage() {
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPageNo() {
        return this.pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getTotal() {
        return this.total;
    }

    public int getPages() {
        return this.pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public List<?> getRecords() {
        return this.records;
    }

    public void setRecords(List<?> records) {
        this.records = records;
    }

    public void setTotal(int total) {
        this.total = total;
        this.pages = total / this.pageSize + (total % this.pageSize > 0 ? 1 : 0);
    }
}
